home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / doc / farsi.txt < prev    next >
Encoding:
Text File  |  2001-09-26  |  9.4 KB  |  267 lines

  1. *farsi.txt*     For Vim version 6.0.  Last change: 2001 Sep 04
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Mortaza Ghassab Shiran
  5.  
  6.  
  7. Right to Left and Farsi Mapping for Vim        *farsi* *Farsi*
  8.  
  9. {Vi does not have any of these commands}
  10.  
  11.                         *E27*
  12. In order to use right-to-left and Farsi mapping support, it is necessary to
  13. compile Vim with the |+farsi| feature.
  14.  
  15. These functions have been made by Mortaza G. Shiran <shiran@jps.net>
  16.  
  17.  
  18. Introduction
  19. ------------
  20. In right-to-left oriented files the characters appear on the screen from right
  21. to left.  This kind of file is most useful when writing Farsi documents,
  22. composing faxes or writing Farsi memos.
  23.  
  24. The commands, prompts and help files are not in Farsi, therefore the user
  25. interface remains the standard Vi interface.
  26.  
  27.  
  28. Highlights
  29. ----------
  30. o  Editing left-to-right files as in the original Vim, no change.
  31.  
  32. o  Viewing and editing files in right-to-left windows.   File orientation is
  33.    per window, so it is possible to view the same file in right-to-left and
  34.    left-to-right modes, simultaneously.
  35.  
  36. o  Compatibility to the original Vim.   Almost all features work in
  37.    right-to-left mode (see bugs below).
  38.  
  39. o  Changing keyboard mapping and reverse insert modes using a single
  40.    command.
  41.  
  42. o  Backing from reverse insert mode to the correct place in the file
  43.    (if possible).
  44.  
  45. o  While in Farsi mode, numbers are entered from left to right. Upon entering
  46.    a none number character, that character will be inserted just into the
  47.    left of the last number.
  48.  
  49. o  No special terminal with right-to-left capabilities is required.  The
  50.    right-to-left changes are completely hardware independent.  Only
  51.    Farsi font is necessary.
  52.  
  53. o  Farsi keymapping on the command line in reverse insert mode.
  54.  
  55. o  Toggling between left-to-right and right-to-left via F8 function key.
  56.  
  57. o  Toggling between Farsi ISIR-3342 standard encoding and VIM Farsi via F9
  58.    function key. Since this makes sense only for the text written in
  59.    right-to-left mode, this function is also supported only in right-to-left
  60.    mode.
  61.  
  62. Farsi Fonts                    *farsi fonts*
  63. -----------
  64.  
  65. Following files are contained in the subdirectories of 'farsi' directory:
  66.  
  67.    +  far-a01.pcf    X Windows fonts for Unix including Linux systems
  68.    +  far-a01.bf     X Windows fonts for SunOs
  69.    +  far-a01.f16    a screen fonts for Unix including Linux systems
  70.    +  far-a01.fon    a monospaced fonts for Windows NT/95/98
  71.    +  far-a01.com    a screen fonts for DOS
  72.  
  73.  
  74. Font Installation
  75. -----------------
  76.  
  77. o  Installation of fonts for MS Window systems (NT/95/98)
  78.  
  79.    From 'Control Panel' folder, start the 'Fonts' program. Then from 'file'
  80.    menu item select 'Install New Fonts ...'. Brows and select the
  81.    'far-a01.fon', then follow the installation guide.
  82.  
  83. o  Installation of fonts for X Window systems (Unix/Linux)
  84.  
  85.    Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a
  86.    directory of your choice.  Change to the directory containing the Farsi
  87.    fonts and execute the following commands:
  88.  
  89.    >  mkfontdir
  90.    >  xset +fp path_name_of_farsi_fonts_directory
  91.  
  92. o  Installation of fonts for X Window systems (SunOs)
  93.  
  94.    Copy far-a01.bf font into a directory of your choice.
  95.    Change to the directory containing the far-a01.fb fonts and
  96.    execute the following commands:
  97.  
  98.    >  fldfamily
  99.    >  xset +fp path_name_of_fonts_directory
  100.  
  101. o  Installation of ASCII screen fonts (Unix/Linux)
  102.  
  103.    For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts
  104.    directory and execute the setfont program as "setfont far-a01.f16". For
  105.    other systems (e.g. SCO Unix), please refer to the fonts installation
  106.    section of your system administration manuals.
  107.  
  108. o  Installation of ASCII screen fonts (DOS)
  109.  
  110.    After system power on, prior to the first use of VIM, upload the Farsi
  111.    fonts by executing the far-a01.com font uploading program.
  112.  
  113.  
  114. Usage
  115. -----
  116. Prior to starting VIM, the environment in which VIM can run in Farsi mode,
  117. must be set.  In addition to installation of Farsi fonts, following points
  118. refer to some of the system environments, which you may need to set:
  119. Key code mapping, loading graphic card in ASCII screen mode, setting the IO
  120. driver in 8 bit clean mode ... .
  121.  
  122. o  Setting the Farsi fonts
  123.  
  124.    +  For VIM GUI set the 'guifont' to far-a01. This is done by entering
  125.       ':set guifont=far-a01' in the VIM window.
  126.  
  127.       You can have 'guifont' set to far-a01 by VIM during the VIM startup
  128.       by appending the ':set guifont=far-a01' into your .vimrc file
  129.       (in case of NT/95/98 platforms _vimrc).
  130.  
  131.       Under the X Window environment, you can also start the VIM with
  132.       '-fn far-a01' option.
  133.  
  134.    +  For the VIM within a xterm, start a xterm with the Farsi fonts (e.g.
  135.       kterm -fn far-a01). Then start the VIM inside the kterm.
  136.  
  137.    +  For VIM under DOS, prior to the first usage of VIM, upload the Farsi
  138.       fonts by executing the far-a01.com fonts uploading program.
  139.  
  140. o  Farsi Keymapping Activation
  141.  
  142.    To activate the Farsi keymapping, set either 'altkeymap' or 'fkmap'.
  143.    This is done by entering ':set akm' or ':set fk' in the VIM window.
  144.    You can have 'altkeymap' or 'fkmap' set as default by appending ':set akm'
  145.    or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms.
  146.  
  147.    To turn off the Farsi keymapping as a default second language keymapping,
  148.    reset the 'altkeymap' by entering ':set noakm'.
  149.  
  150. o  right-to-left Farsi Mode
  151.  
  152.    By default VIM starts in Left-to-right mode. Following are ways to change
  153.    the window orientation:
  154.  
  155.    + Start the VIM with -F option (e.g. vim -F ... ).
  156.  
  157.    + Use F8 function key to toggle between left-to-right and right-to-left.
  158.  
  159.    + While in Left-to-right mode, enter 'set rl' in the command line ('rl' is
  160.      the abbreviation for rightleft).
  161.  
  162.    + Put the 'set rl' line in your '.vimrc' file to start the  VIM in
  163.      right-to-left mode permanently.
  164.  
  165. Encoding
  166. --------
  167.  
  168. The letter encoding used is the VIM extended ISIR-3342 standard with a built
  169. in function to convert between VIM extended ISIR-3342 and ISIR-3342 standard.
  170.  
  171. For document portability reasons, the letter encoding is kept the same across
  172. different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).
  173.  
  174.  
  175. o  Keyboard
  176.  
  177.    +  CTRL-_ in insert/replace modes toggles between Farsi(akm)/Latin
  178.       mode as follows:
  179.  
  180.    +  CTRL-_ moves the cursor to the end of the typed text in edit mode.
  181.  
  182.    +  CTRL-_ in command mode only toggles keyboard mapping between Farsi(akm)/
  183.       Latin. The Farsi text is then entered in reverse insert mode.
  184.  
  185.    +  F8 - Toggles between left-to-right and right-to-left.
  186.  
  187.    +  F9 - Toggles the encoding between ISIR-3342 standard and VIM extended
  188.       ISIR-3342 (supported only in right-to-left mode).
  189.  
  190.    +  Keyboard mapping is based on the Iranian ISIRI-2901 standard.
  191.       Following table shows the keyboard mapping while Farsi(akm) mode set:
  192.  
  193.     -------------------------------------
  194.     `  1  2  3  4  5  6  7  8  9  0  -  =
  195.     ¢  ±  ²  ³  ´  µ  ¶  ·  ¸  ¹  °  ­  ½
  196.     -------------------------------------
  197.     ~  !  @  #  $  %  ^  &  *  (  )  _  +
  198.     ~  £  §  ®  ¤  ¥  ª  ¬  è  ¨  ©  é  «
  199.     -------------------------------------
  200.     q  w  e  r  t  z  u  i  o  p  [  ]
  201.     Ó  Ò  Æ  Ù  Ø  Õ  Ö  à  Ê  É  Ç  ˆ
  202.     -------------------------------------
  203.     Q  W  E  R  T  Z  U  I  O  P  {  }
  204.     ÷  õ  ô  ó  ò  ý  ð  ö  [  ]  {  }
  205.     -------------------------------------
  206.     a  s  d  f  g  h  j  k  l  ;  '  \
  207.     Ñ  Ð  á  Ã  Ü  Á  Å  Þ  Ý  Ú  Û  ë
  208.     -------------------------------------
  209.     A  S  D  F  G  H  J  K  L  :  "  |
  210.     ù  û  þ  ú  ø  À  ü  æ  ç  º  »  ê
  211.     -------------------------------------
  212.     <  y  x  c  v  b  n  m  ,  .  /
  213.     ¾  ×  Ô  Î  Í  Ì  Ë  Ä  ß  ¦  ¯
  214.     -------------------------------------
  215.     >  Y  X  C  V  B  N  M  <  >  ?
  216.     ¼  ñ  Ô  Ï  Í  ¡  Ë  Â  ¾  ¼  ¿
  217.     -------------------------------------
  218.  
  219. Note:
  220.     ¡  stands for Farsi PSP (break without space)
  221.  
  222.     ¢  stands for Farsi PCN (for HAMZE attribute )
  223.  
  224. Restrictions
  225. ------------
  226.  
  227. o  In insert/replace mode and fkmap (Farsi mode) set, CTRL-B is not
  228.    supported.
  229.  
  230. o  If you change the character mapping between Latin/Farsi, the redo buffer
  231.    will be reset (emptied). That is, redo is valid and will function (using
  232.    '.') only within the mode you are in.
  233.  
  234. o  While numbers are entered in Farsi mode, the redo buffer will be reset
  235.    (emptied). That is, you can not redo the last changes (using '.') after
  236.    entering numbers.
  237.  
  238. o  While in left-to-right and Farsi mode set, CTRL-R is not supported.
  239.  
  240. o  While in right-to-left mode, the search on 'Latin' pattern does not work,
  241.    except if you enter the Latin search pattern in reverse.
  242.  
  243. o  In the command mode, there is no support for entering the numbers from left
  244.    to right and also for the sake of the flexibility the keymapping logic is
  245.    restricted.
  246.  
  247. o  Under X Window environment, if you want to run the VIM within a xterm
  248.    terminal emulator and Farsi mode set, you need to have an ANSI compatible
  249.    xterm terminal emulator. This is because the letter codes above 128 decimal
  250.    have certain meanings in the standard xterm terminal emulator.
  251.  
  252.    Note: Under X Window environment, VIM GUI works fine in Farsi mode.
  253.      This eliminates the need of any xterm terminal emulator.
  254.  
  255.  
  256. Bugs
  257. ----
  258. While in insert/replace and Farsi mode set, if you repeatedly change the
  259. cursor position (via cursor movement) and enter new text and then try to undo
  260. the last change, the undo will lag one change behind.  But as you continue to
  261. undo, you will reach the original line of text. You can also use U to undo all
  262. changes made in the current line.
  263.  
  264. For more information about the bugs refer to rileft.txt.
  265.  
  266.  vim:tw=78:ts=8:ft=help:norl:
  267.